﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Assets.aspx.cs" Inherits="Marbles.Web.Admin.Content.Assets" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Asset Browser</title>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link href="/App_Themes/Admin/Site.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <b>Assets</b>

    <div class="scrollDiv"  style="width:610px;height:400px;">
<asp:DataList ID="cLstFiles" runat="server" RepeatDirection="Horizontal" RepeatColumns="10" RepeatLayout="Table">
<ItemTemplate>
<div style="width:80px;height:90px;overflow:hidden; white-space:normal; text-align:center;cursor:hand;" title='<%#Eval("FullFilename") %>' onclick="SelectAsset('<%#Eval("AssetUrl") %>');" >
<img src='<%#Eval("ThumbnailUrl") %>' width="64px" height="64px" alt='<%#Eval("FullFilename") %>' title='<%#Eval("FullFilename") %>' />
<%#Eval("FullFilename") %>
</div>
</ItemTemplate>
</asp:DataList>

    </div><br />
<center><asp:Button ID="cBtnClose" runat="server" Text="Close" OnClientClick="CloseWindow();return false;" /></center>

    <script language="javascript" type="text/javascript">
        function CloseWindow() {
            window.returnValue = '';
            window.close();
        }

        function SelectAsset(id) {
            window.returnValue = id;
            window.close();
        }
    </script>
    </form>
</body>
</html>
